<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>会员详情</title>
	<link rel="stylesheet" type="text/css" href="<?=base_url()?>public/css/style.css">
	<script type="text/javascript" src="<?=base_url()?>public/js/jq.1.12.4.js"></script>
	<script type="text/javascript" src="<?=base_url()?>public/js/js.js"></script>
<style>

</style>
</head>
<body>
	<!-- 头部 -->
	<?php echo $menu ?>
	<!-- 主体 -->
	<div class="main clearfix">
		<?php echo $left ?>
		<div class="content">
			<div class="con">
				<div class="bikuang">
                	<div class="right_title"><span>公益团队中心&nbsp;&nbsp; -<span style="color:#1d3e00; margin:0;">&nbsp;&nbsp;会员详情</span></span></div>  
                    <div style="border-bottom:1px dotted #c2c5ba; padding-bottom:20px;">    
					<div class="person">
					
					<?php echo form_open('admin/member_detail/member_update',array('id'=>'myform')); ?>
					<input type="hidden" name="id" value="<?php echo $user['id'];?>">
                    	<p><span>公益账号</span><input type="text" name="user_account" id="user_account" value="<?php echo $user['user_account'];?>"></p>
                        <p><span>公益推广人</span><b>&nbsp;&nbsp;<?php echo $user['up_account'];?></b></p>
                        <p><span>登录密码</span><input type="password" name="pwd" id="pwd"></p>
                        <p><span>确认密码</span><input type="password" name="pwd2" id="pwd2"></p>
                        <p><span>二级密码</span><input type="password" name="spwd" id="spwd"></p>
                        <p><span>二级密码确认</span><input type="password" name="spwd2" id="spwd2"></p>
                        <p><span>姓名</span><input type="text" name="user_name" id="user_name" value="<?php echo $user['user_name'];?>"></p>
                        <!-- <p class="pos"><span>手机号</span><input type="text" name="mobile" id="mobile" value="<?php echo $user['mobile'];?>"><input id="send_yzm" style="right:20%;" class="input" onClick="alert(1);" type="button" value="发送验证码"></p> -->
                        <!-- <p><span>验证码</span><input type="text" name="yzm" id="yzm"></p> -->
                        <p><span>支付宝帐号</span><input type="text" name="zfb_account" id="zfb_account" value="<?php echo $user['zfb_account'];?>"></p>
                        </div>
                        </div>
                        <div class="person">
                        <p><span>开户行</span><input type="text" name="bank_name" id="bank_name" value="<?php echo $user['bank_name'];?>"></p>
                        <p><span>银行卡号</span><input type="text" name="bank_card" id="bank_card" value="<?php echo $user['bank_card'];?>"></p>
                        <p><span>微信号</span><input type="text" name="wx_id" id="wx_id" value="<?php echo $user['wx_id'];?>"></p>
                        <p><span>公益币</span><input type="text" name="gyb" id="gyb" value="<?php echo $user['public_money'];?>"></p>
						<p><span>静态公益币</span><input type="text" name="jt" id="jt" value="<?php echo $user['jt_money'];?>"></p>
						<p><span>推广公益币</span><input type="text" name="tg" id="tg" value="<?php echo $user['tg_money'];?>"></p>
						<p><span>积分</span><input readonly="readonly" type="text" name="" id="" value="<?php echo $user['score'];?>"></p>
						<p><span>团队等级</span><input readonly="readonly" type="text" name="" id="" value="<?php echo $user['team_lv'];?>"></p>
						<p><span>团队人数</span><input readonly="readonly" type="text" name="" id="" value="<?php echo $user['team_num'];?>"></p>
                        <p><span>冻结</span>
							<input type="radio" style='width:20px;height:20px;box-shadow:none;margin-left:20%;' name="dongjie" value="0" <?php if($user['kick_status']==0){echo "checked='checked'";} ?>>否
							<input type="radio" style='width:20px;height:20px;box-shadow:none;' name="dongjie" value="1" <?php if($user['kick_status']==1){echo "checked='checked'";} ?>>是
						</p>
						
                        <p class="btn"><span><input type="submit" value="确认修改"></span></p>
					</form>
                        
                    </div>
                    </div>
				</div>
			</div>
		</div>
	</div>
	
<script type="text/javascript">
$(function(){

  $('#btn_submit').on('click', function(event) {
    
    //账号
    if($('#user_account').val() == ''){
      alert('请输入公益账号');
      return false;
    }
    if($('#user_account').val().length < 6){
        alert('公益账号长度不得少于6位');
        return false;
	}
    if($('#user_account').val().length > 20){
        alert('公益账号长度不得大于20位');
        return false;
	}
    
    //公益推广人
    if($('#up_account').val() == 0){
      alert('请输入公益推广人');
      return false;
    }
    
    //密码
    if($('#pwd').val() == ''){
      alert('请输入密码');
      return false;
    }
    if($('#pwd').val().length < 6){
        alert('密码长度不得少于6位');
        return false;
	}
    if($('#pwd').val().length > 20){
        alert('密码长度不得大于20位');
        return false;
	}
    
    //校验
    if($('#pwd').val() != $('#pwd2').val()){
      alert('两次输入的密码不一样');
      return false;
    }
    
    //二级密码
    if($('#spwd').val() == ''){
      alert('请输入二级密码');
      return false;
    }
    if($('#spwd').val().length < 6){
        alert('二级密码长度不得少于6位');
        return false;
	}
    if($('#spwd').val().length > 20){
        alert('二级密码长度不得大于20位');
        return false;
	}

    //校验
    if($('#spwd').val() != $('#spwd2').val()){
      alert('两次输入的二级密码不一样');
      return false;
    }

    //姓名
    if($('#user_name').val() == ''){
      alert('请输入姓名');
      return false;
    }
    if($('#user_name').val().length > 8){
        alert('姓名字数不得大于4位');
        return false;
	}

    //手机号
//    var reg = /^\d{11}$/;
//    if(!reg.test($('#mobile').val())){
//      alert('请输入正确的手机号');
//      return false;
//    }

    //短信校验
//     if($('#check_code').val()=='' || $('#check_code').val() != $('#sms_code').val()){
//       alert('请输入正确的短信验证码');
//       return false;
//     }

    //支付宝
    if($('#zfb_account').val() == ''){
      alert('请输入支付宝账号');
      return false;
    }

    $('#myform').submit();
  });
  });
})
</script>

</body>
</html>